Detecting perfect powers by factoring into coprimes
نویسندگان
چکیده
This paper presents an algorithm that, given an integer n > 1, finds the largest integer k such that n is a kth power. A previous algorithm by the first author took time b1+o(1) where b = lg n; more precisely, time b exp(O( √ lg b lg lg b)); conjecturally, time b(lg b)O(1). The new algorithm takes time b(lg b)O(1). It relies on relatively complicated subroutines—specifically, on the first author’s fast algorithm to factor integers into coprimes—but it allows a proof of the b(lg b)O(1) bound without much background; the previous proof of b1+o(1) relied on transcendental number theory. The computation of k is the first step, and occasionally the bottleneck, in many number-theoretic algorithms: the Agrawal-Kayal-Saxena primality test, for example, and the number-field sieve for integer factorization. Here is an algorithm that, given an integer n > 1, finds the largest integer k such that n is a kth power: 1. For each prime power q such that 2 ≤ n, write down a positive integer rq such that if n is a qth power then n = r q . 2. Find a finite coprime set P of integers larger than 1 such that each of n, r2, r3, r4, r5, r7, . . . is a product of powers of elements of P . (In this paper, “coprime” means “pairwise coprime.”) 3. Factor n as ∏ p∈P p np , and compute k = gcd{np : p ∈ P}. It is easy to see that the algorithm is correct. Say n is an `th power. Take any prime power q dividing `. Then n is a qth power, so n = r q ; but rq is a product ∏ p∈P p ap for some exponents ap, so n is a product ∏ p∈P p qap . Factorizations over P are unique, so np = qap for each p. Thus q divides gcd{np : p ∈ P} = k. This is true for all q, so ` divides k. Conversely, n is certainly a kth power. Take, for example, n = 49787136 < 2. Compute approximations r2 = 7056 ≈ n r8 = 9 ≈ n r17 = 3 ≈ n r3 = 368 ≈ n r9 = 7 ≈ n r19 = 3 ≈ n r4 = 84 ≈ n r11 = 5 ≈ n r23 = 2 ≈ n r5 = 35 ≈ n r13 = 4 ≈ n r25 = 2 ≈ n r7 = 13 ≈ n r16 = 3 ≈ n where ≈ means “within 0.6.” Factor {49787136, 7056, 368, 84, 35, 13, 9, 7, 5, 4, 3, 2} into coprimes: each of these numbers is a product of powers of elements of P = Date: 2004.11.13. Permanent ID of this document: bbd41ce71e527d3c06295aadccf60979. 2000 Mathematics Subject Classification. Primary 11Y16. Initial work: Lenstra was supported by the National Science Foundation under grant DMS– 9224205. Subsequent work: Bernstein was supported by the National Science Foundation under grant DMS–0140542. The authors thank the University of California at Berkeley and the Fields Institute for Research in Mathematical Sciences.
منابع مشابه
Factoring into coprimes in essentially linear time
Let S be a finite set of positive integers. A “coprime base for S” means a set P of positive integers such that (1) each element of P is coprime to every other element of P and (2) each element of S is a product of powers of elements of P. There is a natural coprime base for S. This paper introduces an algorithm that computes the natural coprime base for S in essentially linear time. The best p...
متن کاملSums of Divisors, Perfect Numbers and Factoring
Let N be a positive integer, and let denote the sum of the divisors of N = 1+2+3+6 = 12). We show computing is equivalent to factoring N in the following sense: there is a random polynomial time algorithm that, given N),produces the prime factorization of N, and N) can be computed in polynomial time given the factorization of N. We show that the same result holds for the sum of the kth powers o...
متن کاملPrimes, coprimes and multiplicative elements
The purpose of this paper is to study conditions under which the restriction of a certain Galois connection on a complete lattice yields an isomorphism from a set of prime elements to a set of coprime elements. An important part of our study involves the set on which the way-below relation is multiplicative.
متن کاملDetecting perfect powers in essentially linear time
This paper (1) gives complete details of an algorithm to compute approximate kth roots; (2) uses this in an algorithm that, given an integer n > 1, either writes n as a perfect power or proves that n is not a perfect power; (3) proves, using Loxton’s theorem on multiple linear forms in logarithms, that this perfect-power decomposition algorithm runs in time (log n)1+o(1).
متن کاملSparse Perfect Powers
We examine the problem of detecting when a given sparse polynomial f is equal to hr for some other polynomial h and integer r ≥ 2. In this case we say f is a perfect power, and h is its r th root. We give randomized algorithms to detect when f is a perfect power, by repeatedly evaluating the polynomial in specially-chosen finite fields and checking whether the evaluations are themselves perfect...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
- Math. Comput.
دوره 76 شماره
صفحات -
تاریخ انتشار 2007